Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to create workspace #701

Merged
merged 14 commits into from
Jul 24, 2024
Merged

Conversation

jorisv
Copy link
Contributor

@jorisv jorisv commented Jul 16, 2024

This PR aims to allow project using jrl-cmakemodules to be used under the same root CMakeLists.txt (workspace).

  • Use unique target name (prefixed by project name)
  • Keep old target as aggregators
  • Allow to deactivate the automatic call to setup_project_finialize (called in the workspace CMakeLists.txt instead of the project CMakeLists.txt)
  • Reformat some custom_target
  • PROJECT_PACKAGES_IN_WORKSPACE that should avoid running find_package in ADD_PROJECT_DEPENDENCY and ADD_PROJECT_PRIVATE_DEPENDENCY on project already in the workspace
  • Add ADD_PROJECT_PRIVATE_DEPENDENCY that check for PROJECT_PACKAGES_IN_WORKSPACE before calling find_package
  • Add PROJECT_PYTHON_PACKAGES_IN_WORKSPACE to include Python modules from workspace in PYTHONPATH
  • Use PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR instead of CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR since the

dist and doc target is working with multiple project but distcheck is not working. Since distcheck do some very heroic thing with the CMakeCache.txt, I don't think we can make it work for multiple project.

@nim65s
Copy link
Collaborator

nim65s commented Jul 16, 2024

Thanks for this work !
This is still a draft, but can it be reviewed / tested yet, or should I wait a bit ?

@jorisv jorisv force-pushed the topic/workspace branch from 8ad7e87 to 25ae553 Compare July 16, 2024 12:57
@jorisv jorisv force-pushed the topic/workspace branch from 25ae553 to b03972c Compare July 16, 2024 12:58
@jorisv
Copy link
Contributor Author

jorisv commented Jul 16, 2024

I will push similar PR on:

  • eigenpy
  • hpp-fcl
  • pinocchio
  • pycppad
  • example-robot-data
  • proxsuite
  • proxsuite-nlp
  • aligator

I will also create a new repository called simple-robotics/workspace that will store the root CMakelists.txt and probably some scripts to populate the workspace.

@jorisv
Copy link
Contributor Author

jorisv commented Jul 16, 2024

I keep this PR as a draft until I'm sure all modified project still build in standalone mode in the CI.

Copy link
Contributor

@jcarpent jcarpent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressive work @jorisv

@jorisv
Copy link
Contributor Author

jorisv commented Jul 17, 2024

@nim65s If you want to test it, I have uploaded the workspace repository.

If the README.md is hard to understand or you encounter some issues please add some comment in this PR

@jorisv jorisv marked this pull request as ready for review July 22, 2024 12:26
@jorisv jorisv requested a review from jcarpent July 22, 2024 15:50
Copy link
Contributor

@jcarpent jcarpent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorisv I made a quick pass on your code and it seems very good to me.
We may merge it and move on.

Thanks a lot @jorisv for carefully providing this extended feature to the cmake module.

@jcarpent jcarpent merged commit 91b8f5f into jrl-umi3218:master Jul 24, 2024
2 checks passed
@jorisv jorisv deleted the topic/workspace branch July 24, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants